package com.martian.common.util;

/**
 * @author martian
 * @version V1.0.0
 * @Description
 * @date 2023-03-24 14:44
 */

public class RedisKeyUtil {
    public static String buildKey(String template, Integer...args) {
//        String.format("%10s, world", "Hello");     // 输出 " Hello, world"
        return String.format(template, args);
    }
    public static String buildKey(String template, String...args) {
        //格式化字符串
        // 补齐空格并右对齐：
//        String.format("%10s, world", "Hello");     // 输出 " Hello, world"
        return String.format(template, args);
    }

    public static void main(String[] args) {
        System.out.println(String.format("%10s, world", String.valueOf(123)));
    }
}
